import request from '@/utils/request'

// 查询超市货架信息列表
export function listStorage(query) {
  return request({
    url: '/supermarket/storage/list',
    method: 'get',
    params: query
  })
}

// 查询超市货架信息详细
export function getStorage(storageId) {
  return request({
    url: '/supermarket/storage/' + storageId,
    method: 'get'
  })
}

// 新增超市货架信息
export function addStorage(data) {
  return request({
    url: '/supermarket/storage',
    method: 'post',
    data: data
  })
}

// 修改超市货架信息
export function updateStorage(data) {
  return request({
    url: '/supermarket/storage',
    method: 'put',
    data: data
  })
}

// 删除超市货架信息
export function delStorage(storageId) {
  return request({
    url: '/supermarket/storage/' + storageId,
    method: 'delete'
  })
}
